package com.myzk.example.schedule.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
@EnableScheduling
public class SimpleScheduleTask {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @Scheduled(cron = "0 0/1 * * * *")
    public void execute(){
        logger.info("-----SimpleScheduleTask run----{}------",LocalDateTime.now().toString());
    }
}
